/*
 * Javlov - a Java toolkit for reinforcement learning with multi-agent support.
 * 
 * Copyright (c) 2009 Matthijs Snel
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package net.javlov.world;

import java.awt.Shape;
import java.awt.geom.Point2D;

public interface Body extends Affectible {
	
	public final int	UNDEFINED = -1,
						OBSTACLE = 0,
						COLLECTIBLE = 1,
						MOVABLE = 2,
						GOAL = 3,
						AGENT = 4;
	
	/**
	 * @return the position of the body (centre of the body)
	 */
	public Point2D getLocation();
	
	public void setLocation(double x, double y);
	
	/**
	 * @return the x-coordinate of the position of the body (centre of the body)
	 */
	public double getX();
	
	/**
	 * @return the y-coordinate of the position of the body (centre of the body)
	 */
	public double getY();
	public double getBearing();
	
	public void setBearing(double angle);
	
	/**
	 * Return the shape of the body, for drawing and collision purposes.
	 * 
	 * @return the {@link Shape} of the body.
	 */
	public Shape getFigure();
	
	/**
	 * Returns the velocity as a vector with an x- and y-component represented by the x- and
	 * y-components of the returned Point2D.
	 * 
	 * @return a vector specifying the velocity of the body
	 */
	public Point2D getSpeed();
	
	public int getType();
	
	public void setType( int type );
	
	/**
	 * Get the reward associated with colliding with this body.
	 * 
	 * @return the reward associated with colliding with this body.
	 */
	public double getReward();
	
	/**
	 * Set the reward associated with colliding with this body.
	 * 
	 * @param r the reward associated with colliding with this body.
	 */
	public void setReward(double r);
}
